/*
 * @Author: hq
 * @Date: 2022-07-21 21:13:51
 * @LastEditors: hq
 * @LastEditTime: 2022-07-22 11:01:06
 * @Description: your project
 * @version: 1.0
 */
import request from "@/utils/request";

//消息列表
export function chatList(data) {
    return request({
        url: "message/chats", //自己的接口地址
        method: "post", //请求方法
        data,
        base: "chats",
        headers: {
            "Content-Type": "multipart/form-data",
        },
    });
}
//发送消息
export function sendMsg(data) {
    return request({
        url: "message/send", //自己的接口地址
        method: "post", //请求方法
        data,
        base: "chats",
        headers: {
            "Content-Type": "multipart/form-data",
        },
    });
}
//获取授权
export function getAuthorization(data) {
    return request({
        url: "login/auth", //自己的接口地址
        method: "post", //请求方法
        data,
        base: "chats",
        headers: {
            "Content-Type": "multipart/form-data",
        },
    });
}
//查询聊天记录
export function getRecord(data) {
    return request({
        url: "message/list", //自己的接口地址
        method: "post", //请求方法
        data,
        base: "chats",
        headers: {
            "Content-Type": "multipart/form-data",
        },
    });
}
//已读接口
export function alreadyRead(data) {
    return request({
        url: "message/status", //自己的接口地址
        method: "post", //请求方法
        data,
        base: "chats",
        headers: {
            "Content-Type": "multipart/form-data",
        },
    });
}